/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.cmc.service.merchant.service.persistence;

import com.cmc.service.merchant.model.AgentEntry;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import java.util.List;

/**
 * The persistence utility for the agent entry service. This utility wraps {@link AgentEntryPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author ntcuong1
 * @see AgentEntryPersistence
 * @see AgentEntryPersistenceImpl
 * @generated
 */
public class AgentEntryUtil {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
	 */

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
	 */
	public static void clearCache() {
		getPersistence().clearCache();
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
	 */
	public static void clearCache(AgentEntry agentEntry) {
		getPersistence().clearCache(agentEntry);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
	 */
	public long countWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
	 */
	public static List<AgentEntry> findWithDynamicQuery(
		DynamicQuery dynamicQuery) throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
	 */
	public static List<AgentEntry> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
	 */
	public static List<AgentEntry> findWithDynamicQuery(
		DynamicQuery dynamicQuery, int start, int end,
		OrderByComparator orderByComparator) throws SystemException {
		return getPersistence()
				   .findWithDynamicQuery(dynamicQuery, start, end,
			orderByComparator);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
	 */
	public static AgentEntry update(AgentEntry agentEntry, boolean merge)
		throws SystemException {
		return getPersistence().update(agentEntry, merge);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
	 */
	public static AgentEntry update(AgentEntry agentEntry, boolean merge,
		ServiceContext serviceContext) throws SystemException {
		return getPersistence().update(agentEntry, merge, serviceContext);
	}

	/**
	* Caches the agent entry in the entity cache if it is enabled.
	*
	* @param agentEntry the agent entry
	*/
	public static void cacheResult(
		com.cmc.service.merchant.model.AgentEntry agentEntry) {
		getPersistence().cacheResult(agentEntry);
	}

	/**
	* Caches the agent entries in the entity cache if it is enabled.
	*
	* @param agentEntries the agent entries
	*/
	public static void cacheResult(
		java.util.List<com.cmc.service.merchant.model.AgentEntry> agentEntries) {
		getPersistence().cacheResult(agentEntries);
	}

	/**
	* Creates a new agent entry with the primary key. Does not add the agent entry to the database.
	*
	* @param agentId the primary key for the new agent entry
	* @return the new agent entry
	*/
	public static com.cmc.service.merchant.model.AgentEntry create(long agentId) {
		return getPersistence().create(agentId);
	}

	/**
	* Removes the agent entry with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param agentId the primary key of the agent entry
	* @return the agent entry that was removed
	* @throws com.cmc.service.merchant.NoSuchAgentEntryException if a agent entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry remove(long agentId)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().remove(agentId);
	}

	public static com.cmc.service.merchant.model.AgentEntry updateImpl(
		com.cmc.service.merchant.model.AgentEntry agentEntry, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().updateImpl(agentEntry, merge);
	}

	/**
	* Returns the agent entry with the primary key or throws a {@link com.cmc.service.merchant.NoSuchAgentEntryException} if it could not be found.
	*
	* @param agentId the primary key of the agent entry
	* @return the agent entry
	* @throws com.cmc.service.merchant.NoSuchAgentEntryException if a agent entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry findByPrimaryKey(
		long agentId)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByPrimaryKey(agentId);
	}

	/**
	* Returns the agent entry with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param agentId the primary key of the agent entry
	* @return the agent entry, or <code>null</code> if a agent entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry fetchByPrimaryKey(
		long agentId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByPrimaryKey(agentId);
	}

	/**
	* Returns all the agent entries where merchantId = &#63;.
	*
	* @param merchantId the merchant ID
	* @return the matching agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.cmc.service.merchant.model.AgentEntry> findByMerchant(
		long merchantId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByMerchant(merchantId);
	}

	/**
	* Returns a range of all the agent entries where merchantId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param merchantId the merchant ID
	* @param start the lower bound of the range of agent entries
	* @param end the upper bound of the range of agent entries (not inclusive)
	* @return the range of matching agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.cmc.service.merchant.model.AgentEntry> findByMerchant(
		long merchantId, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByMerchant(merchantId, start, end);
	}

	/**
	* Returns an ordered range of all the agent entries where merchantId = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param merchantId the merchant ID
	* @param start the lower bound of the range of agent entries
	* @param end the upper bound of the range of agent entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.cmc.service.merchant.model.AgentEntry> findByMerchant(
		long merchantId, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByMerchant(merchantId, start, end, orderByComparator);
	}

	/**
	* Returns the first agent entry in the ordered set where merchantId = &#63;.
	*
	* @param merchantId the merchant ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching agent entry
	* @throws com.cmc.service.merchant.NoSuchAgentEntryException if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry findByMerchant_First(
		long merchantId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByMerchant_First(merchantId, orderByComparator);
	}

	/**
	* Returns the first agent entry in the ordered set where merchantId = &#63;.
	*
	* @param merchantId the merchant ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching agent entry, or <code>null</code> if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry fetchByMerchant_First(
		long merchantId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByMerchant_First(merchantId, orderByComparator);
	}

	/**
	* Returns the last agent entry in the ordered set where merchantId = &#63;.
	*
	* @param merchantId the merchant ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching agent entry
	* @throws com.cmc.service.merchant.NoSuchAgentEntryException if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry findByMerchant_Last(
		long merchantId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByMerchant_Last(merchantId, orderByComparator);
	}

	/**
	* Returns the last agent entry in the ordered set where merchantId = &#63;.
	*
	* @param merchantId the merchant ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching agent entry, or <code>null</code> if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry fetchByMerchant_Last(
		long merchantId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByMerchant_Last(merchantId, orderByComparator);
	}

	/**
	* Returns the agent entries before and after the current agent entry in the ordered set where merchantId = &#63;.
	*
	* @param agentId the primary key of the current agent entry
	* @param merchantId the merchant ID
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next agent entry
	* @throws com.cmc.service.merchant.NoSuchAgentEntryException if a agent entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry[] findByMerchant_PrevAndNext(
		long agentId, long merchantId,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByMerchant_PrevAndNext(agentId, merchantId,
			orderByComparator);
	}

	/**
	* Returns all the agent entries where merchantId = &#63; and type = &#63;.
	*
	* @param merchantId the merchant ID
	* @param type the type
	* @return the matching agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.cmc.service.merchant.model.AgentEntry> findByM_T(
		long merchantId, java.lang.String type)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByM_T(merchantId, type);
	}

	/**
	* Returns a range of all the agent entries where merchantId = &#63; and type = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param merchantId the merchant ID
	* @param type the type
	* @param start the lower bound of the range of agent entries
	* @param end the upper bound of the range of agent entries (not inclusive)
	* @return the range of matching agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.cmc.service.merchant.model.AgentEntry> findByM_T(
		long merchantId, java.lang.String type, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByM_T(merchantId, type, start, end);
	}

	/**
	* Returns an ordered range of all the agent entries where merchantId = &#63; and type = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param merchantId the merchant ID
	* @param type the type
	* @param start the lower bound of the range of agent entries
	* @param end the upper bound of the range of agent entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.cmc.service.merchant.model.AgentEntry> findByM_T(
		long merchantId, java.lang.String type, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByM_T(merchantId, type, start, end, orderByComparator);
	}

	/**
	* Returns the first agent entry in the ordered set where merchantId = &#63; and type = &#63;.
	*
	* @param merchantId the merchant ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching agent entry
	* @throws com.cmc.service.merchant.NoSuchAgentEntryException if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry findByM_T_First(
		long merchantId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByM_T_First(merchantId, type, orderByComparator);
	}

	/**
	* Returns the first agent entry in the ordered set where merchantId = &#63; and type = &#63;.
	*
	* @param merchantId the merchant ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching agent entry, or <code>null</code> if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry fetchByM_T_First(
		long merchantId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByM_T_First(merchantId, type, orderByComparator);
	}

	/**
	* Returns the last agent entry in the ordered set where merchantId = &#63; and type = &#63;.
	*
	* @param merchantId the merchant ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching agent entry
	* @throws com.cmc.service.merchant.NoSuchAgentEntryException if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry findByM_T_Last(
		long merchantId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByM_T_Last(merchantId, type, orderByComparator);
	}

	/**
	* Returns the last agent entry in the ordered set where merchantId = &#63; and type = &#63;.
	*
	* @param merchantId the merchant ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching agent entry, or <code>null</code> if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry fetchByM_T_Last(
		long merchantId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .fetchByM_T_Last(merchantId, type, orderByComparator);
	}

	/**
	* Returns the agent entries before and after the current agent entry in the ordered set where merchantId = &#63; and type = &#63;.
	*
	* @param agentId the primary key of the current agent entry
	* @param merchantId the merchant ID
	* @param type the type
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next agent entry
	* @throws com.cmc.service.merchant.NoSuchAgentEntryException if a agent entry with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry[] findByM_T_PrevAndNext(
		long agentId, long merchantId, java.lang.String type,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByM_T_PrevAndNext(agentId, merchantId, type,
			orderByComparator);
	}

	/**
	* Returns the agent entry where code = &#63; or throws a {@link com.cmc.service.merchant.NoSuchAgentEntryException} if it could not be found.
	*
	* @param code the code
	* @return the matching agent entry
	* @throws com.cmc.service.merchant.NoSuchAgentEntryException if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry findByCode(
		java.lang.String code)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByCode(code);
	}

	/**
	* Returns the agent entry where code = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param code the code
	* @return the matching agent entry, or <code>null</code> if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry fetchByCode(
		java.lang.String code)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByCode(code);
	}

	/**
	* Returns the agent entry where code = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param code the code
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching agent entry, or <code>null</code> if a matching agent entry could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry fetchByCode(
		java.lang.String code, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByCode(code, retrieveFromCache);
	}

	/**
	* Returns all the agent entries.
	*
	* @return the agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.cmc.service.merchant.model.AgentEntry> findAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll();
	}

	/**
	* Returns a range of all the agent entries.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of agent entries
	* @param end the upper bound of the range of agent entries (not inclusive)
	* @return the range of agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.cmc.service.merchant.model.AgentEntry> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end);
	}

	/**
	* Returns an ordered range of all the agent entries.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of agent entries
	* @param end the upper bound of the range of agent entries (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.cmc.service.merchant.model.AgentEntry> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end, orderByComparator);
	}

	/**
	* Removes all the agent entries where merchantId = &#63; from the database.
	*
	* @param merchantId the merchant ID
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByMerchant(long merchantId)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByMerchant(merchantId);
	}

	/**
	* Removes all the agent entries where merchantId = &#63; and type = &#63; from the database.
	*
	* @param merchantId the merchant ID
	* @param type the type
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByM_T(long merchantId, java.lang.String type)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByM_T(merchantId, type);
	}

	/**
	* Removes the agent entry where code = &#63; from the database.
	*
	* @param code the code
	* @return the agent entry that was removed
	* @throws SystemException if a system exception occurred
	*/
	public static com.cmc.service.merchant.model.AgentEntry removeByCode(
		java.lang.String code)
		throws com.cmc.service.merchant.NoSuchAgentEntryException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().removeByCode(code);
	}

	/**
	* Removes all the agent entries from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public static void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeAll();
	}

	/**
	* Returns the number of agent entries where merchantId = &#63;.
	*
	* @param merchantId the merchant ID
	* @return the number of matching agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static int countByMerchant(long merchantId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByMerchant(merchantId);
	}

	/**
	* Returns the number of agent entries where merchantId = &#63; and type = &#63;.
	*
	* @param merchantId the merchant ID
	* @param type the type
	* @return the number of matching agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static int countByM_T(long merchantId, java.lang.String type)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByM_T(merchantId, type);
	}

	/**
	* Returns the number of agent entries where code = &#63;.
	*
	* @param code the code
	* @return the number of matching agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static int countByCode(java.lang.String code)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByCode(code);
	}

	/**
	* Returns the number of agent entries.
	*
	* @return the number of agent entries
	* @throws SystemException if a system exception occurred
	*/
	public static int countAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countAll();
	}

	public static AgentEntryPersistence getPersistence() {
		if (_persistence == null) {
			_persistence = (AgentEntryPersistence)PortletBeanLocatorUtil.locate(com.cmc.service.merchant.service.ClpSerializer.getServletContextName(),
					AgentEntryPersistence.class.getName());

			ReferenceRegistry.registerReference(AgentEntryUtil.class,
				"_persistence");
		}

		return _persistence;
	}

	/**
	 * @deprecated
	 */
	public void setPersistence(AgentEntryPersistence persistence) {
	}

	private static AgentEntryPersistence _persistence;
}